package com.muse.mapstruct;

import java.util.ArrayList;
import java.util.List;

/**
 * MapStruct演示例子
 */
public class MapStructTest {
    public static void main(String[] args) {
        List<String> nicknames = new ArrayList<>();
        nicknames.add("咪咪");
        Master master = new Master("muse", 10);
        Car car = new Car("Germany", 5, "BMW", nicknames, master);
        CarDto carDto = CarMapper.INSTANCE.carToCarDto(car);
        carDto.getNicknames().add("毛毛");
        carDto.getMaster().setName("bob");
        System.out.println(car);
        System.out.println(carDto);
    }
}
